package main

import "fmt"

// MAP 和 []切片的 一些基本资料
var user = map[string]string{
	"name": "zz",
	"age":  "12",
	"sex":  "男",
}

func main() {
	fmt.Println(user["name"])

	// 循环遍历一个Map
	for k, v := range user {
		fmt.Println(k, v)
	}

	//定义一个切片 切片里面是map数据：
	map1 := make([]map[string]string, 2, 2)

	//切片里面的MAP 先make 才能进行赋值操作
	map1[0] = make(map[string]string)
	map1[0]["a"] = "b"
	map1[0]["b"] = "b"
	map1[0]["c"] = "b"
	map1[0]["d"] = "b"
	map1[0]["e"] = "b"
	map1[0]["f"] = "b"
	map1[0]["g"] = "b"

	fmt.Println(map1[0])
}
